﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.utils {

    public class Strings {

        public static function capitalize(_arg1:String):String{
            var _local2:Array = _arg1.split("");
            var _local3:String = _local2.shift().toUpperCase();
            _local2.unshift(_local3);
            return (_local2.join(""));
        }
        public static function includes(_arg1:String, _arg2:String):Boolean{
            return (((((_arg1) && (_arg2))) && (!((_arg1.indexOf(_arg2) == -1)))));
        }
        public static function replacePatterns(_arg1:String, _arg2:Object):String{
            var _local3:String;
            for (_local3 in _arg2) {
                _arg1 = replacePattern(_arg1, _local3, _arg2[_local3]);
            };
            return (_arg1);
        }
        public static function replacePattern(_arg1:String, _arg2:String, _arg3:String):String{
            var _local4:RegExp = new RegExp((("\\[{2}(" + _arg2) + "|\\s)+\\]{2}"), "g");
            return (_arg1.replace(_local4, _arg3));
        }

    }
}//package net.wooga.pets.utils 
